package us.icitap.dao;

import java.util.List;

import javax.persistence.EntityManager;

import us.icitap.utils.Result;

public interface IPersistenceFacade {

	public abstract <T> Result<T> saveEntity(T entity, EntityManager em);

	public abstract <T> Result<List<T>> getList(Class<T> entityClass,
			boolean withStatus, String orderBy, EntityManager em);

	public abstract <T> Result<List<T>> findByCriteria(
			List<Expression> expressions, String groupByFields,
			String sortFields, Class<T> entity, EntityManager em);

	public abstract <T> Result<T> findEntityById(Object id, Class<T> entity, EntityManager em);

}